import store from '@/store'

export const fixedDict = [
  {
    key: 'fruits',
    value: [
      { label: '苹果', value: 'apple' },
      { label: '香蕉', value: 'banana' },
      { label: '葡萄', value: 'grape' },
      { label: '西瓜', value: 'watermelon' }
    ]
  },
  {
    key: 'sports',
    value: [
      { label: '篮球', value: 'basketball' },
      { label: '跑步', value: 'run' },
      { label: '游泳', value: 'swim' }
    ]
  }
]

export function setFixedDict() {
  fixedDict.forEach((item) => {
    store.dispatch('dict/setDict', item)
  })
}
